package com.xsj.service.impl;

import com.pll.dto.ResponseDto;
import com.xsj.mapper.OrderMapper;
import com.xsj.service.OrderService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * @ClassName OrderServiceImpl
 * @Description TODO
 * @Author 小鹿
 * @Date 2025/6/27 13:40
 */
@Service
@RequiredArgsConstructor
public class OrderServiceImpl implements OrderService
{
    private final OrderMapper orderMapper;
    @Override
    public ResponseDto getCardByUserIdAndMerchantId(Integer userId, Integer merchantId)
    {
        if (userId == null || merchantId == null){
            return ResponseDto.fail(400, "参数错误");
        }
        return ResponseDto.success(orderMapper.getCardByUserIdAndMerchantId(userId,merchantId));
    }
}